//
//  JHAccountTool.m
//  QuickReadComic
//
//  Created by 苗钧豪 on 16/9/9.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "JHAccountTool.h"
@implementation JHAccountTool
+ (void)saveAccount:(NSArray *)account {
    NSUserDefaults *userdefaults = [NSUserDefaults standardUserDefaults];
    // 保存数据 用户信息：用户名：密码
    [userdefaults setObject:account forKey:@"account"];
    [userdefaults setObject:[account objectAtIndex:0] forKey:@"userName"];
    [userdefaults setObject:[account objectAtIndex:1] forKey:@"passWord"];
}

+(NSArray *)getAccount {
    NSUserDefaults *userdefaults = [NSUserDefaults standardUserDefaults];
    NSArray *array = [userdefaults objectForKey:@"account"];
    return array;
}

+(NSString *)getUserName {
    NSUserDefaults *userdefaults = [NSUserDefaults standardUserDefaults];
    NSString *userName = [userdefaults objectForKey:@"userName"];
    return userName;
}

+(NSString *)getPassword {
    NSUserDefaults *userdefaults = [NSUserDefaults standardUserDefaults];
    NSString *passWord = [userdefaults objectForKey:@"passWord"];
    return passWord;
}
@end
